import { createRouter, createWebHashHistory } from "vue-router";
import Main from "../views/Main.vue";
import Login from "../views/Login.vue";
import Home from "../views/Home.vue";
import MenuManagement from "../views/system/MenuManagement.vue";
import RoleManagement from "../views/system/RoleManagement.vue";
import UserManagement from "../views/system/UserManagement.vue";
import SystemDataPage from "../views/system/SystemDataPage.vue";
import TechnologyRouteManagement from "../views/technology/TechnologyRouteManagement.vue";
import AddNewTray from "../views/operation/AddNewTray.vue";
import AddReworkTray from "../views/operation/AddReworkTray.vue";
import ChangeProcess from "../views/operation/ChangeProcess.vue";
import ClearTray from "../views/operation/ClearTray.vue";
import LocationMonitor from "../views/operation/LocationMonitor.vue";
import TrayInfo from "../views/operation/TrayInfo.vue";
import UnbindCell from "../views/operation/UnbindCell.vue";

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: "/",
      component: Main,
      redirect: "/Home",
      children: [
        { path: "/Home", component: Home },
        { path: "/MenuManagement", component: MenuManagement },
        { path: "/RoleManagement", component: RoleManagement },
        { path: "/UserManagement", component: UserManagement },
        { path: "/SystemDataPage", component: SystemDataPage },
        { path: "/AddNewTray", component: AddNewTray },
        { path: "/AddReworkTray", component: AddReworkTray },
        { path: "/ChangeProcess", component: ChangeProcess },
        { path: "/ClearTray", component: ClearTray },
        { path: "/LocationMonitor", component: LocationMonitor },
        { path: "/TrayInfo", component: TrayInfo },
        { path: "/UnbindCell", component: UnbindCell },
        {
          path: "/TechnologyRouteManagement",
          component: TechnologyRouteManagement,
        },
      ],
    },
    { path: "/Login", component: Login },
  ],
});

export default router;
